/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package ie.deloitte.cvapp.webcontrollers;

import java.util.Date;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

/**
 *
 * @author Daniel
 */
@Controller
@RequestMapping("/")
public class WelcomeController {

    @RequestMapping(method = RequestMethod.GET)
    public String welcome(Model model) {

        Date today = new Date(System.currentTimeMillis());
        model.addAttribute("date", today);
        System.out.println("Welcome page");
        return "index";
    }
}
